<!DOCTYPE html>
<!-- saved from url=(0059)/index.php/Home/User/extract_money.html -->
<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no">
		<link href="__INDEX__/css/mui.min.css" rel="stylesheet" />
		<link href="__INDEX__/css/Phoebe.css" rel="stylesheet"/>
		<link href="__INDEX__/css/all.css" rel="stylesheet"/>	
		<link href="__INDEX__/css/my-wallet.css" rel="stylesheet"/>	
		<title>提现</title>
		<style>
			.extract{
				padding: 0 3.5%;
				background: #fff;
				padding-bottom: 30px;
				padding-top: 15px;
			}
			.extract>form>p{
				overflow: hidden;
			}
			.extract>form>p:nth-child(5){
				padding-left: 15%;
				font-size: 12px;
				line-height: 25px;
			}
			.extract>form>p>span{
				float: left;
				width: 15%;
				line-height: 40px;
			}
			.extract>form>p>input,.extract>form>p>select{
				float: left;
				width: 85%;
				/*margin-bottom: 0px;*/
				background: #fff;
				margin-bottom: 15px;
				border: 1px solid #ccc !important;
			}
			select {
			    line-height: 40px !important;
			    height: 40px !important;
			    padding: 0 15px 0 10px;
			    background: url(/public/Home/images/down.png) no-repeat !important;
			    background-size: 10px 10px !important;
			    background-position: 97% 14px !important;
			}
			.extract>form>p:nth-child(4)>input{
				margin-bottom: 0;
			}
			.extract>form>input{
				width: 100%;
				margin-top: 30px;
			}
			.extract>form>p:last-child{
				text-align: center;
				font-size: 12px;
				line-height: 25px;
			}
			.mima-model{
				position: fixed;
				top:0;
				left: 0;
				right: 0;
				bottom: 0;
				background: rgba(0,0,0,0.8);
				display: none;
			}
			.mima-model>div{
				width: 80%;
				margin: 0 auto;
				margin-top: 150px;
				background: #fff;
				border-radius: 5px;
			}
			.mima-model>div{
				padding-bottom: 20px;
			}
			.mima-model>div>h2{
				line-height: 45px;
				background: #1E81D2;
				color: #fff;
				text-align: center;
				font-size: 16px;
				height: 45px;
				border-radius: 5px 5px 0px 0px;
				position: relative;
			}
			.mima-model>div>h2>span{
				font-size: 12px;
				position: absolute;
				right: 5px;
			}
			.mima-model>div>p{
				width: 90%;
				line-height: 40px;
				margin: 0 auto;
				margin-top: 10px;

			}
			.mima-model>div>p>input{
				margin-bottom: 0px;
			}
			.mima-model>div>button{
				width: 90%;
				margin-left: 5%;
				margin-top: 20px;
				background: #1E81D2;
				color: #fff;
				text-align: center;
				font-size: 16px;		
				height: 40px;
			}
			.mima-model>div>p>span{
				color: #e4393c;
			}
			.xp{
				margin-top: 10px !important;
			}
		</style>
	</head>
	<body>
		<header class="mui-bar mui-bar-nav">
			<a href="/index.php/Home/User/my_center.html" class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
			<h1 class="mui-title">钱包提现</h1>
		</header>

		<!--提现-->
		<div class="extract">
			<form action="/index.php/Home/User/extract_money.html" method="post">
				<p><span>银行：</span>
					<input style="height: 35px;line-height: 35px;" type="bank_no" required="" readonly="readonly" value="{$user_info.bank_no}">
				</p>
				<p><span>金额：</span><input type="number" required="" name="cashreg_money" id="cashreg_money"></p>
				<p><span></span>可提现金额为：{$user_info.money}</p>
				<input style="background-color: #007aff;color: white;" type="button" class="user_withdraw_conf" value="提现">
				<p style="padding-left: 0px;text-align: left; ">＊提现金额需满{$config.tixian_min}<br>
					＊提现手续费率{$config.order_fee}<br>
					＊提现2小时内到账<br>
					＊提现时间为工作日9:00-18:00
				</p>
			</form>
		</div>
		<!--填写交易密码-->
		<div class="mima-model">
			<div>
				<h2>请确认提现信息<span id="thiscl">关闭</span></h2>
				<!--<p><input type="password"  required placeholder="请设置您的交易密码"/></p>-->
				<p class="dz_money">到账金额：<span></span></p>
				<p class="sx_money">手续费：<span></span></p>
				<button id="tx_conf">确认</button>
			</div>
		</div>
<script src="__TEMPLATE__/js/mui.min.js"></script>
<script src="__TEMPLATE__/js/jquery-1.11.3.js"></script>
<script src="__PUBLIC__/static/layui/layui.all.js"></script>
<script>
	$("#thiscl").click(function(){ $(".mima-model").css("display","none");});
		var user_id = '{$Think.session.uid}';

		if(user_id == "" || user_id == null) {
			layer.msg("请先登录", {
				icon: 1,
				time: 1000 //2秒关闭（如果不配置，默认是3秒）
			}, function() {
				location.href = "{:url('index/login')}";
			});
		}
		var bank_no = '{$user_info.bank_no}';
		if(bank_no == "" || bank_no == null) {
			layer.msg("请先添加银行卡", {
				icon: 1,
				time: 1000 //2秒关闭（如果不配置，默认是3秒）
			}, function() {
				location.href = "{:url('index/member/add_bankc')}";
			});
		}
        $(".user_withdraw_conf").click(function () {
//            user_name=$("#user_name").val();
            bank_id=$("#bank_name option:selected").val();
            cashreg_money=$("#cashreg_money").val();
			var yh_money=parseFloat("{$user_info.money}");
			var min=parseFloat('{$config.tixian_min}')
			if(!cashreg_money){
			    alert("请输入您所需要提现的金额数！");
			}else if(cashreg_money*1<min){
                alert("您输入的金额小于"+min+"元，不满足提现的规则！");
			}else if(cashreg_money*1>yh_money*1){
                alert("您输入的金额大于您可提现的金额，请重新输入！");

			} else{
                $(".mima-model").css("display","block");


                val=cashreg_money*0.01;
                sxf=val.toFixed(2);
                $(".sx_money span").html(sxf);
                $(".dz_money span").html(cashreg_money-sxf);
                $("#tx_conf").click(function () {
                        $.ajax({
                            url: "{:url('member/tixian')}",
                            type: 'post',
                            datatype: 'json',
                            data:{
                                cashreg_money:cashreg_money
                            },
                            success:function ( data ) {
                                layer.msg(data.msg, {
									icon: 1,
									time: 1000 //2秒关闭（如果不配置，默认是3秒）
								}, function() {
									location.href = "{:url('index/member/my_wallet')}";
								});
                            }
                        })


                })
			}




        })
	</script>
</body></html>